package com.sy.core.exception;

/**
 * 数据库异常类，在数据访问层抛出
 * 
 * @author liqw
 * @Date 2011-8-17
 * @version 1.0
 */
public class DaoException extends BaseException {

	private static final long serialVersionUID = -7583000005035156444L;

	// 异常标题
	private String errorTitle;

	public DaoException() {
		super();
	}

	public DaoException(String message) {
		super(message);
		this.errorTitle = "";
	}
	
	public DaoException(String title, String message) {
		super(message);
		this.errorTitle = title;
	}

	public DaoException(String title, String message, Throwable cause) {
		super(message, cause);
		this.errorTitle = title;
	}

	public DaoException(String message, Throwable cause) {
		super(message, cause);
		this.errorTitle = "";
	}

	@Override
	public String getErrorDescription() {
		return this.getMessage();
	}

	@Override
	public String getErrorTitle() {
		return this.errorTitle;
	}

}
